﻿#ifndef USER_DB_H
#define USER_DB_H

#include "database.h"

class DATABASE_EXPORT user_db:public Database
{
public:
    user_db(QString db_path_name);

    int user_create_table(QString table_name);
    bool user_check(QString user_name);
    char user_insert_info(QString user_name, QString user_password);
    char user_login_check(QString login_name,QString login_password);

private:
    QString USER_DATA_PATH = "data/user/";
    QString user_table_name ="user_info";
    QString user_data_all_name ;
    QSqlDatabase user_sql_db;
    //用户信息表
    QString CREATE_USER = "create table user_info (id int primary key, name varchar(20),password VARCHAR(8))";
    //查找命令
    QString SELECT_USER = "select name,password from user_info";

};

#endif // USER_DB_H
